package ${basePackage}.common;

/**
 * 通用错误码定义。
 */
public enum ErrorCode {

    SUCCESS(200, "成功"),
    OPERATION_ERROR(500, "操作失败"),
    NOT_FOUND_ERROR(404, "数据不存在"),
    PARAMS_ERROR(400, "请求参数错误");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}

